//
//  UserGuideView.h
//  etionUI
//
//  Created by WangJian on 14-2-24.
//  Copyright (c) 2014年 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum
{
    EUserGuideUnitTypeText,         // 单纯的文字
    EUserGuideUnitTypeImage,        // 单纯的图片
    EUserGuideUnitTypeCircleNode    // CUserGuideCircleNoteView类型
} EUserGuideUnitType;


/**
 *  CUserGuideUnit 用户指引显示的元素的属性
 */
@interface CUserGuideUnit : NSObject

@property (nonatomic, assign) EUserGuideUnitType type;
@property (nonatomic, assign) CGRect area;
@property (nonatomic, copy) NSString *text;
@property (nonatomic, retain) UIFont *textFont;
@property (nonatomic, retain) UIImage *image;

+ (id)unitWithType:(EUserGuideUnitType)type area:(CGRect)area text:(NSString *)text image:(UIImage *)image;

@end

@class CUserGuideView;
@protocol CUserGuideViewDelegate <NSObject>

@optional
- (void)userGuideViewHasClicked:(CUserGuideView *)guidView;

@end

/**
 *  用户指定显示层，支持多个显示元素
 */
@interface CUserGuideView : UIView

+ (CUserGuideView *)userGuideViewWithUnits:(NSArray *)arUnites delegate:(id<CUserGuideViewDelegate>)delegate;

- (void)show;

/**
 *  如果没有实现userGuideViewHasClicked回调，则操作指引视图会在用户点击之后自动调用dismiss
 */
- (void)dismiss;

@end
